home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr04
/
edv340.zip
/
EXTRACT.DOC
< prev
next >
Wrap
Text File
|
1992-12-09
|
3KB
|
58 lines
Extract - a font extractor
Written by Rick Owens, 1992
This program will attempt to extract a VGA/EGA font table from another file.
This is handy for pulling a good looking font from within another file, such
as a font loader, an 'impure' font file, etc.
This program is FREEWARE; you may use it without sending me (or anyone else,
for that matter) any money. I hope you will find it useful.
WARNING: You use this program at your own risk. If anything goes wrong, no
one else shall be held responsible for any problems you encounter.
Usage: EXTRACT infile outfile offset length
Where infile is the source file,
outfile is the file name for the raw font,
offset is the start of the font data within infile, and
length is the number of bytes in the font table.
The offset and length values are assumed to be hexadecimal; to enter the
values in decimal, precede them with the letter 'u' (for unsigned int). For
example, '100' would be interpreted at 256 decimal, while 'U100' would be
interpreted as 100 decimal. (The case of the U doesn't matter.)
To find the values, use LIST or DEBUG or some other program that will provide
a hex dump of the file. Once the program finishes, you should have a font
file that can be read by any program that will handle raw font files. I
recommend EDV, the VGA font editor I wrote (also freeware), but there are
plenty of other ones around.
The program doesn't do any data analysis, so you can use it to extract other
types of data, provided you know what part of a file you want to extract.
For instance, if you find a particular font loader that you really like (or
if you just want to collect 'em, and use different ones for different
purposes), you can use Extract to pull the executable code out of the .COM
file, then use the COPY command with the /b switch to combine the loader and
the font of your choice. Note that this will only work if 1) the new font is
the same size as the old font, and 2) the font loader is a self contained
chunk of code which can be prefixed to the raw font. If those conditions
are met, the command is:
copy /b loader.com+sample.fnt complete.com
Replace 'loader.com' with the name you used for the file which contains the
executable code you extracted, replace 'sample.fnt' with the name of a raw
font file, and replace 'complete.com' with the name you want for the
completed program (loader + font). (By the way, EDV can save fonts with a
simple font loader prefixed, so you don't have to do all the messing
around.) I recommend that you store most of your fonts as raw files, and
make self-loaders only as needed (e.g., for a non-literate friend). In the
case of 8x16 fonts, the extra few bytes of code means that you'll be using
one more allocation unit per file. That can translate to 2048k _or more_ of
wasted space per file on a hard disk.
Note: for obvious reasons, Extract can't do much with font loaders
compressed with PKLite, Diet, or a similar program.